﻿@{
    ViewBag.Title = "User Test";
}

<h2>User Test</h2>
    <button id="GetUserButton">GetUser</button>
<form action="@Url.Action("UploadImage","Image")" method="post" enctype="multipart/form-data">
@*<form action="http://54.249.85.116/Image/Upload" method="post" enctype="multipart/form-data">*@
  <label for="file">Filename:</label>
  <input type="file" name="file" id="file" />
  <input type="hidden" name="token" id="token" value="lHvuenOyBJTNnXJOj2Hd2Q=="/>
  <input type="submit" />
</form>


<form action="@Url.Action("DeleteShoppingBasket", "Purchase")" id="DeleteShoppingBasketForm" method="post">
  <input type="text" name="token" value="4LAeRkXuYs4STyipKk+GWQ=="/>
  <input type="text" name="productIdList[]" value="1"/>
  <input type="text" name="productIdList[]" value="5"/>
  <input type="date" name="d"/>
  <input type="submit" />
</form>

@section Scripts
{
    <script type="text/javascript">
        $("#GetUserButton").click(function () {
            var productIdList = "[1,5]";


            $.post('@Url.Action("DeleteShoppingBasket", "Purchase")', { token: "4LAeRkXuYs4STyipKk+GWQ==", productIdList: productIdList })
            .done(function (data) {
                if(data.result =="SUCCESS")
                {
                    alert("result: " + data.data);
                }
            });

        });
    </script>
}